#ifndef SETWIG_H
#define SETWIG_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QImage>

namespace Ui {
class SetWig;
}

class SetWig : public QWidget
{
    Q_OBJECT

public:
    explicit SetWig(QWidget *parent = 0);
    ~SetWig();

private slots:
    void on_start_button_clicked();

    void on_shot_button_clicked();

    void handleStreamData();

    void processMjpegFrame();

private:
    Ui::SetWig *ui;
    QNetworkAccessManager *networkManager;
    QNetworkReply *streamReply;
    QByteArray mjpegBuffer;
    QImage currentFrame;
    bool isStreaming;
    QString streamUrl;
};

#endif // SETWIG_H
